<%@page import="java.util.Date"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html>
    <body>
        <h3>Item List</h3>
        <%
            java.util.Date tgl = new java.util.Date();
            pageContext.setAttribute("tgl", tgl);
        %>
        <fmt:formatDate value="${tgl}" pattern="dd MMMM yyyy"/>
        <table border="1">
            <tr>
                <td>Nama</td>
                <td>Keterangan</td>
                <td>Harga</td>
            </tr>
            <c:forEach items="${requestScope.list}" var="x">
                <tr>
                    <td>${x.nama}</td>
                    <td>${x.keterangan}</td>
                    <td align="right"><fmt:formatNumber 
                        type="currency" currencySymbol="Rp." value="${x.harga}"/></td>
                </tr>
            </c:forEach>
            
        </table>
    </body>
</htm>